< previous page page_954 next page >

Page 954
3. The answer to part C appears in the following table:
Field
Data Type
Visual Basic Type
SSNo
Text
String
Last
Text
String
First
Text
String
Age
Byte
Integer
City
Text
String
St
Text
String
Comments
Memo
String

4. Perform the following steps to add the checkbox: First, double-click the checkbox control. Second, position the checkbox in an aesthetically pleasing position on the form. Third, set these properties:
Property
Setting
DataSource
datFieldTypes
DataField
BOOLEAN
Name
chkBoolean

Run your program and check the BOOLEAN box. Notice that nothing happens to the BOOLEAN text field. Now move to the subsequent record, and then return. You should see 1 displayed in the BOOLEAN text field.
This example shows how to use a checkbox to enter values into fields. Your program can now reference this field and get the value as 1 (yes) or 0 (no), which are the only two values that can be in a BOOLEAN type data field.
Day 3
Answers to Day 3 Quiz
1. Visual Basic database objects are dataset-oriented. You work with a set of records at one time, not one record at a time as you would with a record-oriented database.
2. The Dynaset is the most common Visual Basic data object. It is the object created when you open a form with a data control.
3. Dynasets use minimal RAM resources. Visual Basic stores only the pointers to the records in the underlying table, not the actual data.
4. Weaknesses of using Dynasets include the following:
e7ae6bd512ad4c3583017fcda52f57ae.gif
· You can't specify an index with a Dynaset. Dynasets are only a portion of the underlying table, whereas indexes are for the entire table.

 
< previous page page_954 next page >

If you like this book, buy it!